package part05_原型模式.p03_深拷贝;

import java.io.Serializable;

/**
 * @ClassName: DeepCloneableTarget
 * @Author: AllenSun
 * @Date: 2019/12/6 21:24
 */
public class DeepCloneableTarget implements Serializable,Cloneable {
    private String cloneName;
    private String cloneClass;

    public DeepCloneableTarget(String cloneName, String cloneClass) {
        this.cloneName = cloneName;
        this.cloneClass = cloneClass;
    }

    //因为这个类的属性都是String，所以我们这里使用默认的clone完成即可
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
